// Paketinė OS, II variantas
// Edmundas Drūteika
// Vytautas Bačiulis

class Machine
{
    long CS=10;
    long DS=140;
    long AX=0;
    long BX=0;
    long CC=10;
    long SF=0;
    long TM=0;
    long MODE=0;
    long PI=0;
    long IOI=0;
    LongObject[] memory=new LongObject[4096];
    Machine ()
    {
        for(int i = 0; i<4096; i++)
            this.memory[i]=new LongObject();
    }
    LongObject[] getVMMemory()
    {
        LongObject[] VMMemory=new LongObject[256];
        int DS=(int) this.DS;
        int CS=(int) this.CS;
        for (int i = 0; i<256;i++)
        {
           if (i<128)
               VMMemory[i]=this.memory[CS++];
           else
               VMMemory[i]=this.memory[DS++];

        }
        return VMMemory;
    }
    void changeAX(long value)
    {
        this.AX=value;
    }
    void changeBX(long value)
    {
        this.BX=value;
    }
    void  changeCC(long VMCC)
    {
        this.CC=VMCC+this.CS;
    }
    void changeSF(long value)
    {
        this.SF=value;
    }
    void changePI(long value)
    {
        this.PI=value;
    }
    void changeIOI(long value)
    {
        this.IOI=value;
    }
    long getPI()
    {
        return this.PI;
    }
    long getIOI()
    {
        return this.IOI;
    }
    long getDS()
    {
        return this.DS;
    }
    long getCS()
    {
        return this.CS;
    }
    long getAX()
    {
        return this.AX;
    }
    long getBX()
    {
        return this.BX;
    }
    long getCC()
    {
        return this.CC;
    }
    long getSF()
    {
        return this.SF;
    }
    long getTM()
    {
        return this.TM;
    }
    long getMode()
    {
        return this.MODE;
    }
    LongObject[] getMemory()
    {
        return this.memory;
    }
}